const unit = {
  state: {
    checkFormTransform: true,
    checkResult: true
  },
  mutations: {
    CHECK_FORM_TRANSFORM: (state) => {
      state.checkFormTransform = !state.checkFormTransform
    },
    CHECK_FORM_RESULT: (state, result) => {
      console.log("store-unit-result", result);
      if(!result.through){
        state.checkResult = false
      }
    }
  },
  actions: {
    CheckFormTransform({ commit }){
      commit('CHECK_FORM_TRANSFORM')
    },
    CheckFormResult({ commit }, result){
      commit('CHECK_FORM_RESULT', result)
    }
  }
}

export default unit
